import java.awt.*; class demo { public static void main(String args[ ]) { Frame frm=new Frame("CCIT-Amravati"); frm.setSize(400,300); frm.setVisible(true); } }
import java.awt.*; class MyFrame extends Frame { public MyFrame() { setBackground(Color.yellow); setTitle("CCIT india"); } } class demo { public static void main(String args[]) { MyFrame frm=new MyFrame(); frm.setSize(400,300); frm.setVisible(true); } }
import java.awt.*; import java.awt.event.*; class MyFrame extends Frame implements ActionListener { Button btn; public MyFrame() { btn=new Button("Exit"); add(btn,"South"); btn.addActionListener(this); } public void actionPerformed(ActionEvent e) { System.exit(0); } } class demo { public static void main(String args[ ]) { MyFrame frm=new MyFrame(); frm.setSize(400,300); frm.setVisible(true); } }